using System;
using System.Collections.Generic;
using System.Text;

namespace Activa.ProMesh
{
    public class CSVisitorProvider : IVisitorProvider
    {
        public string CreateVisitor()
        {
            Visitor visitor = Visitor.New();

            visitor.Save();

            return visitor.VisitorID.ToString();
        }

        public T GetVisitorObject<T>(string visitorId) where T:class,IVisitorRecord
        {
            return (T) (IVisitorRecord) Visitor.Read(int.Parse(visitorId));
        }

        public Type GetVisitorObjectType()
        {
            return typeof(Visitor);
        }
    }
}
